package com.symaster.common.util;

/**
 * @author yinmiao
 * @date 2021-07-25 19:07
 */
public class IntegerUtil {

    public static Integer getInteger(String str) {
        StringBuilder sb = new StringBuilder();
        char[] chars = str.toCharArray();
        for (char aChar : chars) if (aChar >= '0' && aChar <= '9') sb.append(aChar);
        return sb.length() <= 0 ? null : Integer.parseInt(sb.toString());
    }
}
